import Login from './components/login.vue'
import Home from './components/home.vue'

const routes = [
  {
    path:"/teacher/login",
    redirect: '/login',
  },
  {
    path: '/',
    redirect: '/login',
  },
  {
    path: '/login',
    component: Login,
  },

  // add 2018-7-27
  {
    path:"/",
    component:Home,
    children:[
      {
        path:"?what",
        component:resolve=>require(["./components/common/timebar.vue"],resolve),
        children:[
          {
            path: '/student',
            component:resolve=>require(["./components/student/list.vue"],resolve)
          },{
            path: '/student/add',
            component:resolve=>require(["./components/student/detail.vue"],resolve)
          },{
            path: '/student/detail/:id',
            component:resolve=>require(["./components/student/detail.vue"],resolve)
          },
          // add 20181229
          {
            path:"/teacherManage/paper",
            component:resolve=>require(["./components/teachermanage/paper/paper.vue"],resolve)
          },{
            path:"/teacherManage/scientific",
            component:resolve=>require(["./components/teachermanage/scientific/scientific.vue"],resolve)
          },{
            path:"/teacherManage/meetings",
            component:resolve=>require(["./components/teachermanage/meetings/meetings.vue"],resolve)
          },{
            path:"/teacherManage/communicate",
            component:resolve=>require(["./components/teachermanage/communicate/communicate.vue"],resolve)
          },{
            path:"/teacherManage/teaching",
            component:resolve=>require(["./components/teachermanage/teaching/teaching.vue"],resolve)
          },{
            path:"/teacherManage/info",
            component:resolve=>require(["./components/teachermanage/info/info.vue"],resolve)
          },{
            path:"/teacherManage/info/detail/:number",
            component:resolve=>require(["./components/center/center.vue"],resolve)
          },
          
          // 个人中心
          {
            path:"/center",
            component:resolve=>require(["./components/center/center.vue"],resolve)
          },

          // 权限管理
          {
            path:"/privilege",
            component:resolve=>require(["./components/privilege/privilege.vue"],resolve)
          },

          // 学术成果
          {
            path:"/academicpaper",
            component:resolve=>require(["./components/achievements/academicpaper/academicpaper.vue"],resolve)
          },{
            path:"/teachmaterial",
            component:resolve=>require(["./components/achievements/teachmaterial.vue"],resolve)
          },{
            path:"/scientificawards",
            component:resolve=>require(["./components/achievements/scientific.vue"],resolve)
          },{
            path:"/softwork",
            component:resolve=>require(["./components/achievements/softwork.vue"],resolve)
          },
          
          {
            path:"/joinactivity",
            component:resolve=>require(["./components/joinactivity/joinactivity.vue"],resolve)
          },{
            path:"/runmeeting",
            component:resolve=>require(["./components/joinactivity/runmeeting.vue"],resolve)
          },

          // 研究生成果
          {
            path:"/competition",
            component:resolve=>require(["./components/research/competition.vue"],resolve)
          },{
            path:"/honorary",
            component:resolve=>require(["./components/research/honorary.vue"],resolve)
          },{
            path:"/professional",
            component:resolve=>require(["./components/research/professional.vue"],resolve)
          },{
            path:"/guidance",
            component:resolve=>require(["./components/research/guidance.vue"],resolve)
          },{
            path:"/otherteaching",
            component:resolve=>require(["./components/research/otherteaching.vue"],resolve)
          },{
            path:"/famoust",
            component:resolve=>require(["./components/research/famoust.vue"],resolve)
          },{
            path:"/classChange",
            component:resolve=>require(["./components/research/classChange.vue"],resolve)
          },{
            path:"/researchs",
            component:resolve=>require(["./components/research/researchs.vue"],resolve)
          },{
            path:"/teachingpaper",
            component:resolve=>require(["./components/research/teachingpaper.vue"],resolve)
          },{
            path:"/textbooks",
            component:resolve=>require(["./components/research/textbooks.vue"],resolve)
          },{
            path:"/teaching/results",
            component:resolve=>require(["./components/teaching/results.vue"],resolve)
          },{
            path:"/teaching/project",
            component:resolve=>require(["./components/research/project.vue"],resolve)
          },{
            path:"/teaching/appraise",
            component:resolve=>require(["./components/research/appraise.vue"],resolve)
          },{
            path:"/teaching/reform",
            component:resolve=>require(["./components/research/reform.vue"],resolve)
          },{
            path:"/teaching/course",
            component:resolve=>require(["./components/research/course.vue"],resolve)
          },

          // 消息中心
          {
            path:"/message",
            component:resolve=>require(["./components/message/message.vue"],resolve)
          }
        ],
      }
    ]
  },
]

export default routes
